package com.example.homework.homework02;

public class Test {
    public static void main(String[] args) {
        Punishment punishment = new Punishment(100, "Hello");

        // 创建线程任务对象
        Runnable task = new CopyRunnable(punishment);

        // 创建线程对象
        Thread t1 = new Thread(task, "小明");
        Thread t2 = new Thread(task, "小王");

        // 启动线程
        t1.start();
        t2.start();
    }
}
